package com.ssy.lingxi.order.model.constant;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 送货相关操作方法枚举（主要用于记录送货相关内、外流转记录）
 * @author czh
 * @version 2.0.0
 * @date 2021-07-19
 */
public enum DeliveryOperationEnum {

    CREATE_DELIVERY_PLAN(1,"保存送货计划"),

    MODIFY_DELIVERY_PLAN(2,"变更送货计划"),

    CONFIRM_DELIVERY_PLAN(3,"确认送货计划"),

    CREATE_NOTICE_ORDER(4,"生成送货通知单"),

    MODIFY_NOTICE_ORDER(5,"变更送货通知单"),

    CONFIRM_NOTICE_ORDER(6,"确认送货通知单"),

    INVALID_NOTICE_ORDER(7,"作废"),

    CREATE_DELIVERY_ORDER(8,"生成送货单"),

    MODIFY_DELIVERY_ORDER(9,"变更送货单"),

    CONFIRM_DELIVERY_ORDER(10,"确认送货单"),

    CREATE_RECEIVE_ORDER(11,"生成收货单"),

    MODIFY_RECEIVE_ORDER(12,"变更收货单"),

    CONFIRM_RECEIVE_ORDER(13,"确认收货单"),

    SUBMIT_DELIVERY_PLAN(14,"提交送货计划"),

    ;

    DeliveryOperationEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    /**
     * 操作枚举值
     */
    private Integer code;
    /**
     * 操作枚举值
     */
    private String name;

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getNameByCode(Integer code) {
        return LanguageHolder.getName(DeliveryOperationEnum.class, code);
    }
}
